//
//  HomepaCollectionViewCell.m
//  迷笛
//
//  Created by . on 2018/9/6.
//  Copyright © 2018年 🍃🌺🌺🍃. All rights reserved.
//

#import "MIDIHomepaCollectionViewCell.h"

@implementation MIDIHomepaCollectionViewCell
//-(UILabel *)lable
//{
//    if (!_lable)
//    {
//        _lable =[[UILabel alloc]init];
//        _lable.backgroundColor =[UIColor redColor];
//        [self addSubview:_lable];
//        [_lable mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.top.equalTo(self).offset(WidthScale(20));
//            make.left.mas_equalTo(WidthScale(20));
//            make.width.mas_equalTo(WidthScale(40));
//            make.height.mas_equalTo(HeightScale(40));
//        }];
//    }
//    return _lable;
//}
-(UIView *)backview
{
    if (!_backview)
    {
        _backview =[[UIView alloc]init];
        _backview.backgroundColor =[UIColor redColor];
        [self addSubview:_backview];
        [_backview mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.mas_equalTo(self);
            make.centerX.mas_equalTo(self);
            make.width.mas_equalTo(WidthScale(97));
            make.height.mas_equalTo(kDevice_Is_iPhoneX?HeighX(97):HeightScale(97));
        }];
    }
    return _backview;
}
//
-(UIImageView *)songimage
{
    if (!_songimage)
    {
        _songimage =[[UIImageView alloc]init];
        [_backview addSubview:_songimage];
        [_songimage mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.backview);
            make.left.mas_offset(WidthScale(5));
            make.width.mas_equalTo(WidthScale(89));
            make.height.mas_equalTo(kDevice_Is_iPhoneX?HeighX(66):HeightScale(66));
        }];
    }
    return _songimage;
}
-(UIImageView *)mainimage
{
    if (!_mainimage)
    {
        _mainimage =[[UIImageView alloc]init];
        _mainimage.backgroundColor = [UIColor redColor];
        [_backview addSubview:_mainimage];
        [_mainimage mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.songimage);
            make.left.mas_equalTo(WidthScale(5));
            make.width.mas_equalTo(WidthScale(60));
            make.height.mas_equalTo(kDevice_Is_iPhoneX?HeighX(60):HeightScale(60));
        }];
    }
    return _mainimage;
}
-(UILabel *)song
{
    if (!_song)
    {
        _song =[[UILabel alloc]init];
        _song.textColor = [UIColor whiteColor];
        _song.font =[UIFont systemFontOfSize:WidthScale(14)];
        [self addSubview:_song];
        [_song mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.backview.mas_bottom).offset(WidthScale(5));
            make.left.mas_equalTo(WidthScale(0));
            make.width.mas_offset(WidthScale(100));
            make.height.mas_offset(HeightScale(20));
        }];
    }
    return _song;
}
-(UILabel *)singer
{
    if (!_singer)
    {
        _singer =[[UILabel alloc]init];
        _singer.textColor = [UIColor whiteColor];
        _singer.font =[UIFont systemFontOfSize:WidthScale(12)];
        [self addSubview:_singer];
        [_singer mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.song.mas_bottom).offset(WidthScale(5));
            make.left.mas_equalTo(WidthScale(0));
            [self.singer setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
        }];
    }
    return _singer;
}





@end
